<?php TPL::output('m/header_meta.tpl.htm'); ?>
<?php if ($_GET['uid']) { ?>
<!-- 标题 -->
<div class="aw-title">
	<img src="<?php echo get_avatar_url($this->user['uid'], 'mid'); ?>" width="25" class="img" />
	<?php _e('与 %s 对话', $this->user['user_name']); ?>
</div>
<!-- end 标题 -->

<!-- 内容 -->
<div class="container padding-0">
	<!-- 私信回复box -->
	<div class="aw-inbox-replay-box">
		<form action="inbox/ajax/send/" onsubmit="return false;" method="post" id="pm_form">
			<input type="hidden" name="post_hash" value="<?php echo new_post_hash(); ?>" />
   	  		<input type="hidden" name="recipient" value="<?php echo $this->user['user_name']; ?>" />
   	  		<input type="hidden" name="return_url" value="/m/inbox/" />
			<input type="text" class="form-control" name="message" />
			<a class="btn btn-success btn-normal"  onclick="AWS.ajax_post($('#pm_form'));">发送</a>
		</form>
	</div>
	<!-- end 私信回复box -->
</div>
<!-- end 内容 -->
<?php } else { ?>
<!-- 搜索栏 -->
<div class="aw-inbox-search-bar">
	<form action="m/search/" method="post">
		<input type="text" class="form-control" name="q" placeholder="搜索用户" autocomplete="off" value="<?php echo $this->keyword; ?>" />
		<i class="icon icon-search"></i>
	</form>
</div>
<!-- end 搜索栏 -->
<!-- 内容 -->
<div class="container active padding-0">
	<div class="aw-search-result-box">
		<div class="mod-body">
			<!-- 搜索结果 -->
			<div class="mod result-mod">
				<div class="mod-body">
					<ul id="search_result">
					</ul>
				</div>
			</div>
		</div>
	</div>
</div>
<?php } ?>

<script>
	$(function()
	{
		$('.aw-search-bar input').focus();
	});
</script>

<?php TPL::output('m/footer.tpl.htm'); ?>